package com.erlang4j.api.exceptions;

import com.erlang4j.internal.exceptions.Erlang4jException;
import com.erlang4j.internal.exceptions.Erlang4jExceptionConstants;

/**
 * <p>
 * You have passes an object that isnt a String or an OtpErlangPid to a method expecting one of those two
 * </p>
 */
public class Erland4jExpectedServerNameOrPidException extends Erlang4jException {

	public Erland4jExpectedServerNameOrPidException(Object serverNameOrPid) {
		super(Erlang4jExceptionConstants.expectedServerNameOrPidException, serverNameOrPid, serverNameOrPid == null ? "null" : serverNameOrPid.getClass().getSimpleName());
	}

}
